import logging
import yagmail

def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(asctime)s----%(levelname)s----%(message)s',filename='log.txt',filemode='w+')

def send_email(file):
    s=yagmail.SMTP(user='1441688225@qq.com',password='subvcobnwlujggee',host='smtp.qq.com')
    s.send(to='1441688225@qq.com',subject='4.15日考',contents='请查收',attachments=file)